package com.jytc.framework.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * FwUserRole entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "fw_user_role")
public class FwUserRole implements java.io.Serializable {

	// Fields

	private Integer userRoleId;
	private FwRole fwRole;
	private FwUser fwUser;
	private Integer status;

	// Constructors

	/** default constructor */
	public FwUserRole() {
	}

	/** minimal constructor */
	public FwUserRole(Integer status) {
		this.status = status;
	}

	/** full constructor */
	public FwUserRole(FwRole fwRole, FwUser fwUser, Integer status) {
		this.fwRole = fwRole;
		this.fwUser = fwUser;
		this.status = status;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "USER_ROLE_ID", unique = true, nullable = false)
	public Integer getUserRoleId() {
		return this.userRoleId;
	}

	public void setUserRoleId(Integer userRoleId) {
		this.userRoleId = userRoleId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ROLE_ID")
	public FwRole getFwRole() {
		return this.fwRole;
	}

	public void setFwRole(FwRole fwRole) {
		this.fwRole = fwRole;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_ID")
	public FwUser getFwUser() {
		return this.fwUser;
	}

	public void setFwUser(FwUser fwUser) {
		this.fwUser = fwUser;
	}

	@Column(name = "STATUS", nullable = false)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

}